package com.hmall.search.service.impl;

import com.hmall.common.clients.ItemClient;
import com.hmall.common.dto.PageDTO;
import com.hmall.common.dto.SearchDTO;
import com.hmall.common.pojo.Item;
import com.hmall.common.vo.SearchVo;
import com.hmall.search.service.ISearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class SearchService implements ISearchService {

    @Autowired
    private ItemClient itemClient;


    /**
     * 过滤聚合共功能
     * @return
     */
    @Override
    public SearchVo searchFilters() {
        return itemClient.searchFilters();
    }

    /**
     * 基本搜索列表
     * @param dto
     * @return
     */

    @Override
    public PageDTO<Item> searchList(SearchDTO dto) {
        return itemClient.searchList(dto);
    }
}
